package com.qiyi.cupid.adplayer.utils
{
   import flash.net.URLRequest;
   import flash.net.sendToURL;
   
   public class CupidAdPlayerPb extends Object
   {
      
      public function CupidAdPlayerPb(param1:Object, param2:Object) {
         super();
         this.pbtp = param1.pbtp;
         this.act = param1.act;
         this.code = param1.code;
         this.adtp = param1.adtp;
         this.adid = param1.adid;
         this.data = param1.data;
         this.type = param1.type;
         this.uid = param2["userId"];
         this.httpCookieId = param2["httpCookieId"];
         this.ppuid = param2["passportId"];
         this.weid = param2["webEventId"];
         this.veid = param2["videoEventId"];
         this.capid = param2["playerId"];
         this.vid = param2["videoId"];
         this.tvid = param2["tvId"];
         this.aid = param2["albumId"];
         this.cid = param2["channelId"];
         this.cptp = param1.cptp;
         this.impid = param1.impid;
         this.seqid = param1.seqid;
         this.oid = param1.oid;
         this.crtid = param1.crtid;
         this.url = this.code?CupidAdPlayerConstants.PINGBACK_SERVICE_CFP:CupidAdPlayerConstants.PINGBACK_SERVICE_ADPB;
      }
      
      private var url:String;
      
      private var vid:String;
      
      private var tvid:String;
      
      private var aid:String;
      
      private var cid:String;
      
      private var type:String;
      
      private var uid:String;
      
      private var httpCookieId:String;
      
      private var weid:String;
      
      private var veid:String;
      
      private var act:String;
      
      private var adtp:String;
      
      private var pbtp:String;
      
      private var adid:String;
      
      private var capid:String;
      
      private var data:String;
      
      private var code:String;
      
      private var cptp:String;
      
      private var impid:String;
      
      private var seqid:String;
      
      private var oid:String;
      
      private var crtid:String;
      
      private var ppuid:String;
      
      public function call() : void {
         var _loc1_:String = this.urlPre();
         var _loc2_:URLRequest = new URLRequest(_loc1_);
         sendToURL(_loc2_);
      }
      
      private function urlPre() : String {
         this.url = this.url.concat("?pbtp=" + this.pbtp);
         this.url = this.act?this.url.concat("&act=" + this.act):this.url;
         this.url = this.code?this.url.concat("&code=" + this.code):this.url;
         this.url = this.uid?this.url.concat("&uid=" + this.uid):this.url;
         this.url = this.httpCookieId?this.url.concat("&hcid=" + this.httpCookieId):this.url;
         this.url = this.ppuid?this.url.concat("&ppuid=" + this.ppuid):this.url;
         this.url = this.weid?this.url.concat("&weid=" + this.weid):this.url;
         this.url = this.veid?this.url.concat("&veid=" + this.veid):this.url;
         this.url = this.capid?this.url.concat("&capid=" + this.capid):this.url;
         this.url = this.vid?this.url.concat("&vid=" + this.vid):this.url;
         this.url = this.tvid?this.url.concat("&tvid=" + this.tvid):this.url;
         this.url = this.aid?this.url.concat("&aid=" + this.aid):this.url;
         this.url = this.cid?this.url.concat("&cid=" + this.cid):this.url;
         this.url = this.adtp?this.url.concat("&adtp=" + this.adtp):this.url;
         this.url = this.adid?this.url.concat("&adid=" + this.adid):this.url;
         this.url = this.type?this.url.concat("&type=" + this.type):this.url;
         this.url = this.data?this.url.concat("&data=" + encodeURIComponent(this.data)):this.url;
         this.url = this.cptp?this.url.concat("&cptp=" + this.cptp):this.url;
         this.url = this.impid?this.url.concat("&impid=" + this.impid):this.url;
         this.url = this.seqid?this.url.concat("&seqid=" + this.seqid):this.url;
         this.url = this.oid?this.url.concat("&oid=" + this.oid):this.url;
         this.url = this.crtid?this.url.concat("&crtid=" + this.crtid):this.url;
         this.url = this.url.concat("&tn=" + new Date().time);
         return this.url;
      }
   }
}
